$OpenBSD: patch-Wnn_etc_msg_c,v 1.2 2017/04/29 14:31:40 espie Exp $
--- Wnn/etc/msg.c.orig
+++ Wnn/etc/msg.c
@@ -50,12 +50,13 @@
 */
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include "commonhd.h"
 #include "wnn_os.h"
 #include "msg.h"
 
-extern char *getenv();
-
+#if 0
 static char *
 bsearch(ky, bs, nel, width, compar)
 char *ky;
@@ -100,6 +101,7 @@ int (*compar)();
     }
     return ((char *) 0);	/* not found */
 }
+#endif
 
 static char *
 getlang(lang)
@@ -361,7 +363,7 @@ char	*msg;
 register char	*lang;
 {
     register struct msg_cat *cd;
-    char ret[128];
+    static char ret[128];
     register char *msg_bd;
 
     if(catd == 0)
